<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


Route::get('/','IndexController@index');

Route::get('/home',function(){
	return 'welcome to center';
});

//用户注册路由
Route::post('auth/register',['middleware'=>'App\Http\Middleware\EmailMiddleware','uses'=>'Auth\AuthController@postRegister']);
Route::get('auth/register','Auth\AuthController@getRegister');

//用户登录路由
Route::get('auth/login','Auth\AuthController@getLogin');
Route::post('auth/login','Auth\AuthController@postLogin');

//home登录后跳转路由
Route::get('home','Auth\AuthController@index');

//用户退出路由
Route::get('auth/logout','Auth\AuthController@getLogout');

//用户借款路由
Route::get('jie','ProController@jie');
Route::post('jie','ProController@jiePost');

//用户审核路由
Route::get('prolist','CheckController@prolist');
Route::get('check/{pid}','CheckController@check');
Route::post('check/{pid}','CheckController@checkPost');

// Route::group(['prefix'=>'auth','namespace'=>'Auth'],function(){
// 		Route::get('register','AuthController@getRegister');
// 		Route::post('register',['middleware'=>'App\Http\Middleware\EmailMiddleware','uses'=>'AuthController@postRegister']);
// 		Route::get('login','AuthController@getLogin');
// 		Route::post('login','AuthController@postLogin');
// 		Route::get('logout','AuthController@getLogout');
// });

//用户投资路由
Route::get('pro/{pid}','ProController@pro');
Route::post('touzi/{pid}','ProController@touzi');

//我的收益路由
Route::get('payrun','GrowController@run');

//我的还款路由
Route::get('myzd','ProController@myzd');

//我的投资路由
Route::get('mytz','ProController@mytz');

//我的收益路由
Route::get('mysy','ProController@mysy');

//在线支付路由
Route::post('pay','ProController@pay');